var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, n) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var n in e)
              Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
          })(e, n);
      };
      return function (e, n) {
        function i() {
          this.constructor = e;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        t(e, n),
          (e.prototype =
            null === n
              ? Object.create(n)
              : ((i.prototype = n.prototype), new i()));
      };
    })(),
  AXListDataDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        WebSocketService.addListener({
          caller: e,
          code: 1001,
          method: e.onLoadChengHaoListData,
        }),
        WebSocketService.addListener({
          caller: e,
          code: 10011,
          method: e.onReqModifyData,
        }),
        (e.list_data_content.vScrollBarSkin = ""),
        (e.list_data_content.renderHandler = new Handler(e, e.onRender)),
        (e.list_data_content.selectEnable = !0),
        e.list_data_content.on(Laya.Event.CLICK, e, e.onClickListDataAction),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showListDataView = function (t) {
        return (
          null == this.lsitDataDig &&
            ((this.lsitDataDig = new e()), (this.lsitDataDig.zOrder = 1e3)),
          this.lsitDataDig.popup(),
          t && "ZhongJiangMingDan" == t.type
            ? ((this.lsitDataDig.jsonDict = t),
              (this.lsitDataDig.label_list_title.text = t.title),
              this.lsitDataDig.onLoadZhongJiangMingDanListData(t.data))
            : WebSocketService.send({ c: 1001, d: { pageNum: 0 } }),
          this.lsitDataDig
        );
      }),
      (e.prototype.onLoadZhongJiangMingDanListData = function (t) {
        for (var e, n = [], i = 0; i < t.length; i++) {
          var a = t[i];
          (e = {
            item_name: {
              text: i + 1 + "、" + a.roleName + "   获得 " + a.bonus,
            },
            titleName: a.titleName,
            titleId: a.titleId,
          }),
            n.push(e);
        }
        this.list_data_content.array = n;
      }),
      (e.prototype.onLoadChengHaoListData = function (t) {
        for (var e, n = t.list, i = [], a = 0; a < n.length; a++) {
          var o = n[a];
          (e = {
            item_name: { text: o.titleName },
            titleName: o.titleName,
            titleId: o.titleId,
          }),
            i.push(e);
        }
        this.list_data_content.array = i;
      }),
      (e.prototype.onRender = function (t, e) {
        if (!this.jsonDict || "ZhongJiangMingDan" != this.jsonDict.type) {
          var n = t.getChildByName("item_name");
          e == this.list_data_content.selectedIndex
            ? (n.bgColor = "e9f308")
            : (n.bgColor = "dd9583");
        }
      }),
      (e.prototype.onClickListDataAction = function (t) {
        if (
          "" != t.target.name &&
          (!this.jsonDict || "ZhongJiangMingDan" != this.jsonDict.type)
        ) {
          var e = this.list_data_content.selectedItem;
          WebSocketService.send({
            c: 10011,
            d: { titleId: e.titleId, type: 2 },
          }),
            this.close();
        }
      }),
      (e.prototype.onReqModifyData = function (t) {
        ToastView.toastView(t.data);
      }),
      e
    );
  })(ui.common.AXListDataDialogUI);
